import request from "@/utils/request";
//商品列表
export function fetchTreeList() {
  return request({
    url: "/product/categoryTreeList",
    method: "get"
  });
}
//商品详情
export function getDetail(id) {
  return request({
    url: "/product/detail/" + id,
    method: "get"
  });
}
//获取评论
export function getCommentData(id) {
  return request({
    url: "/comments/" + id,
    method: "get"
  });
}

//加入购物车
export function postAddCartData(data = {}) {
  return request({
    url: "/cart/add",
    method: "post",
    data: data
  });
}
